package com.zhixi;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author zhixi
 * exclude = {DataSourceAutoConfiguration.class}：排除SpringBoot自带的数据源配置
 * EnableAspectJAutoProxy：启动动态代理
 */
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
@MapperScan("com.zhixi.mapper")
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class DynamicDatasourceSpringbootApplication {

    public static void main(String[] args) {
        SpringApplication.run(DynamicDatasourceSpringbootApplication.class, args);
    }

}
